﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Commissioning
{
    [NHibernateEntity(Table = "CommissionCAT")]
    public class CommissionCAT : ITrackable, ICommissionApplicability
    {
        public CommissionCAT() { }

        [PrimaryKey]
        public virtual int Id { get; set; }


        [BelongsTo(Column = "ID_CommissionSchema")]
        public virtual CommissionSchema CommissionSchema { get; set; }

        [Property]
        public virtual double GrossValue { get; set; }


        [Property]
        public virtual double? GWPMin { get; set; }

        [Property]
        public virtual double? GWPMax { get; set; }


        [Property]
        public virtual int? NumberOfContractsMin { get; set; }

        [Property]
        public virtual int? NumberOfContractsMax { get; set; }


        [Property]
        public virtual double NumberOfActivitiesMin { get; set; }

        [Property]
        public virtual double NumberOfActivitiesMax { get; set; }


        [Property]
        public virtual int? HireMonthMin { get; set; }

        [Property]
        public virtual int? HireMonthMax { get; set; }


        [Property]
        public virtual CommissionZone CommissionZone { get; set; }



        [BelongsTo(Column = "ID_CommissionType")]
        public virtual CommissionType CommissionType { get; set; }

        [BelongsTo(Column = "ID_Role")]
        public virtual Role Role { get; set; }

        [BelongsTo(Column = "ID_Position")]
        public virtual Position Position { get; set; }

        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }
        
        [Property]
        public virtual CommissionApplicability CommissionApplicability { get; set; }
        

        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }

    
}
